package zhr.chapter7;

public class Example7_1 {
    public static void main(String[] args) {
        String s = "Java面向对象程序设计";
        int len = s.length();
        System.out.println("字符串s的长度为：" + len);
        for (int i = 0; i < len; i++) {
            char c = s.charAt(i);
            System.out.println("s中的第" + i + "个字符是" + c);
        }
    }
}
